package com.dingwei.superiordiary.adapter.adapter;

import android.content.Context;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.dingwei.superiordiary.R;
import com.jude.easyrecyclerview.adapter.BaseViewHolder;
import com.jude.easyrecyclerview.adapter.RecyclerArrayAdapter;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * Created by lihao on 2018/1/8.
 */

public class RankingListAdapter extends RecyclerArrayAdapter<String> {
    public RankingListAdapter(Context context) {
        super(context);
    }

    @Override
    public BaseViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) {
        return new RankingListHolder(parent);
    }

    class RankingListHolder extends BaseViewHolder<String> {

        @Bind(R.id.img)
        ImageView img;
        @Bind(R.id.tv_title)
        TextView tvTitle;
        @Bind(R.id.tv_look)
        TextView tvLook;
        @Bind(R.id.tv_like)
        TextView tvLike;
        @Bind(R.id.tv_collect)
        TextView tvCollect;
        @Bind(R.id.tv_type)
        TextView tvType;

        public RankingListHolder(ViewGroup parent) {
            super(parent, R.layout.item_goods);
            ButterKnife.bind(this, itemView);
        }

        @Override
        public void setData(String data) {
            super.setData(data);
        }
    }
}
